package com.thoughtworks.util.http;

public class HttpTemplate {
    RequestExecutor requestExecutor;

    public HttpTemplate(RequestExecutor requestExecutor) {
        this.requestExecutor = requestExecutor;
    }

    public void execute(Object requestData, HttpResponseHandler handler) {
        requestExecutor.execute(requestData, handler);
    }

    public void setRequestHeader(String headerName, String headerValue) {
        requestExecutor.setRequestHeader(headerName, headerValue);
    }

    protected String getUrl() {
        return requestExecutor.getUrl();
    }
}
